package pack

import (
	"mall_frontend_api/biz/model"
	"mall_frontend_api/biz/model/setting"
)

func ContactUs(info *model.ContactUsOption) *setting.ContactUsOption {
	data := setting.NewContactUsOption()
	if info == nil {
		return data
	}
	data.ID = info.ID
	data.Name = info.Name
	return data
}

func ContactUsOption(list []*model.ContactUsOption) []*setting.ContactUsOption {
	var data = make([]*setting.ContactUsOption, 0)
	if len(list) == 0 {
		return data
	}
	for _, c := range list {
		data = append(data, ContactUs(c))
	}
	return data
}
